package com.zhuanzhuan.hero.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhuanzhuan.hero.user.dto.BasePageQueryDTO;
import com.zhuanzhuan.hero.user.dto.privacy.SwitchPrivacyDTO;
import com.zhuanzhuan.hero.user.entity.HeroUserPrivacySetup;
import com.zhuanzhuan.hero.user.vo.PageResultWrapper;
import com.zhuanzhuan.hero.user.vo.UserListItemVO;
import com.zhuanzhuan.hero.user.vo.privacy.ShowVisitRecordSwitchVO;

import javax.annotation.Nullable;
import java.util.List;

/**
 * dal Interface:HeroUserPrivacySetupRecord
 * @author hanjunjun
 * @date 2024-6-26
 */
public interface HeroUserPrivacySetupService extends IService<HeroUserPrivacySetup> {

    List<HeroUserPrivacySetup> listByUid(Long fromUid, Long toUid);

    /**
     * 隐私设置
     *
     * @param fromUid
     * @param toUid
     * @param isInvisible 是否开启不看ta
     * @param isBlock  是否开启不让ta看
     * @return void
     * @author  hanjunjun
     * @date 2024/6/26
     **/
    void setupPrivacy(Long fromUid, Long toUid, @Nullable Integer isInvisible, @Nullable Integer isBlock);

    void delById(Long id);

    /**
     * 查询隐私设置开关
     *
     * @param uid
     * @return com.zhuanzhuan.hero.user.vo.privacy.ShowVisitRecordSwitchVO
     * @author  hanjunjun
     * @date 2024/7/1
     **/
    ShowVisitRecordSwitchVO queryShowVisitRecordSwitch(Long uid);

    /**
     * 隐私设置开关
     *
     * @param uid
     * @param switchPrivacyDTO
     * @return void
     * @author  hanjunjun
     * @date 2024/7/1
     **/
    void switchPrivacy(Long uid, SwitchPrivacyDTO switchPrivacyDTO);

    /**
     * 分页查询隐私设置用户列表
     *
     * @param fromUid
     * @param privacyType
     * @return com.zhuanzhuan.hero.user.vo.PageResultWrapper<com.zhuanzhuan.hero.user.vo.UserListItemVO>
     * @author  hanjunjun
     * @date 2024/7/1
     **/
    PageResultWrapper<UserListItemVO> pagePrivacyUser(Long fromUid, Integer privacyType, BasePageQueryDTO basePageQueryDTO);

    /**
     * 根据fromUid和类型查询
     *
     * @param fromUid
     * @param privacyType  可以为空
     * @return java.util.List<com.zhuanzhuan.hero.user.entity.HeroUserPrivacySetup>
     * @author  hanjunjun
     * @date 2024/7/1
     **/
    List<HeroUserPrivacySetup> listByUidAndPrivacyType(Long fromUid, Integer privacyType);

    /**
     * 根据toUid和类型查询
     * @param toUid
     * @param privacyType
     * @return
     */
    List<HeroUserPrivacySetup> listByToUidAndPrivacyType(Long toUid, Integer privacyType);
}